
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src='../dist/bundle.js'></script>
</head>
<body>
    <div c-tpl='data'>
        <input type='text' :value='d'> 
        <ul>
         ~ each i,v in abc ~
                ~ each item in v ~
                ~ if Math.random() > 0.5
                <li>~ item ~ 0.5+</li>
                ~ else if Math.random() > 0.5 ~
                <li>else if item</LI>
                ~ else ~
                <li>0.5-</li>
                ~ end ~
                ~ end ~
            ~ end ~
        </ul>
        ~ d ~
        <a href='javascript:;' :click="d++">click me</a>
    </div>
</body>
</html>

<script>
    Cube.set("data",{
        d : 1,
        abc : [{
            ccc : 1,
        },{
            ccc : 2
        }]
    });

    
</script>